import './index.scss';

declare const $: any;

const formtime = (t: number) => {
  const h = Math.floor(t / 60 / 60)
  const m = Math.floor(t / 60 % 60)
  const s = Math.floor(t % 60)
  return `${h < 10 ? ('0' + h) : h}:${m < 10 ? ('0' + m) : m}:${s < 10 ? ('0' + s) : s}`
}

let time: number = +$("#time").attr("time");
setInterval(() => {
  time += 1;
  $("#time").attr("time", time).text(formtime(time))
}, 1000)

$(window).scroll(function () {
  if ($(window).scrollTop() > $(".title_1113").height() + 30) {
    $(".title_1113").addClass("fixed")
    $(".asid_1416").addClass("fixed")
  } else {
    $(".title_1113").removeClass("fixed")
    $(".asid_1416").removeClass("fixed")
  }
})